﻿// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "AbilitySystemInterface.h"
#include "Abilities/TestAttributeSet.h"
#include "GameFramework/Character.h"
#include "Abilities/TestAbilitySystemComponent.h"
#include "TestCharacter.generated.h"

UCLASS()
class TEST002_API ATestCharacterBase : public ACharacter, public IAbilitySystemInterface
{
	GENERATED_BODY()

public:
	// Sets default values for this character's properties
	ATestCharacterBase();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

protected:
	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, meta = (BlueprintProtected))
	UTestAbilitySystemComponent* TestAbilitySystemComponent;
public:
	virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;

	UFUNCTION(BlueprintPure, Category = "TestCharacterBase", meta = (BlueprintProtected, DisplayName = "GetTestAbilitySystemComponent", CompactNodeTitle = "Test Ability System Component"))
	UTestAbilitySystemComponent* BP_GetTestAbilitySystemComponent() const;

	UFUNCTION(BlueprintImplementableEvent)
	FName GetCharacterName(bool IsNickName);

	UFUNCTION(BlueprintNativeEvent)
	bool IsCharacterValid() const;
	bool IsCharacterValid_Implementation() const { return true; }

protected:
	UPROPERTY()//Must be added if you want to use "Get Float Attribute From Ability System Component" node in blueprint
	UTestAttributeSet* TestAttributeSet;
};
